<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>区视频云托管网站</title>

    <!--引入axios库-->
    <script src="js/axios.min.js"></script>
    <!-- 引入VUE库 -->
    <script src="js/vue.min.js"></script>

    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>

</head>
<body class="git-project lang-zh-CN dimmable webkit" style="">
<div id="app">
    <link rel="stylesheet" href="css/detail1.css">
    <link rel="stylesheet" href="css/detail2.css">
    <link rel="stylesheet" href="css/detail3.css">
    <link rel="stylesheet" href="css/detail4.css">

    <div id="MathJax_Message" style="display: none;"></div>
    <div class="site-content">
        <!--    头像  仓库名展示-->
        <div class="git-project-header">
            <div class="ui container">
                <div class="git-project-header-details">
                    <div class="git-project-header-container">
                        <!--                        <h2 class="git-project-title mt-0 mb-0">-->
                        <span class="project-title">
                            <a v-for="user in gUserMessages" href="#" class="js-popover-card" data-username="">
                                        <img class="ui avatar image" alt="图片不存在"
                                             :src="user.head">
                                    </a>
                            <!--                            用户昵称-->
                            <a th:title="owner.head" class="author" href="#"
                               th:text="${owner.nickName}">持续计划中...</a> /
                            <!--                            当前仓库-->
                            <a title="yc116-config" class="repository" target=""
                               style="padding-bottom: 0px; margin-right: 4px" sa_evt="repoClick" sa_location="仓库页面"
                               sa_url="" sa_repo_id="24113752"
                               th:href="|detail?cid=${store.cid}|"
                               th:text="${store.cname}">yc116-config</a> /
                            <!--                            路径-->
                            <span th:each="p : ${paths}">
                                <a th:text="${p.name}"
                                   th:href="|detail?cid=${store.cid}&filePath=${p.path}|"
                                   title="yc116-config" class="repository" target=""
                                   style="padding-bottom: 0px; margin-right: 4px" sa_evt="repoClick" sa_location="仓库页面"
                                   sa_url="" sa_repo_id="24113752">yc116-config</a> /
                            </span>
                        </span>
                        </h2>
                    </div>
                </div>
            </div>

        </div>
        <div class="ui container">
            <div class="git-project-content-wrapper">

                <div class="ui grid" id="project-wrapper">
                    <div class="twelve wide column">
                        <div class="git-project-content" id="git-project-content">
                            <div class="git-project-bread" id="git-project-bread">
                                <div class="git-project-right-actions pull-right">
                                    <div @click.prevent="drawer0 = true" class="ui orange button" id="btn-dl-or-clone">
                                        上传文件
                                        <i class="dropdown icon"></i>
                                    </div>
                                </div>
                                <div class="d-inline pull-right" id="git-project-root-actions">
                                    <div class="ui horizontal list repo-action-list">
                                        <div class="item">
                                            <div class="ui pointing right top dropdown gradient button"
                                                 id="git-project-file" tabindex="0">
                                                <el-dropdown trigger="click" @command="fileButtons">
                                                    <span class="el-dropdown-link">
                                                        文件夹<i class="el-icon-arrow-down el-icon--right"></i>
                                                    </span>
                                                    <i class="dropdown icon"></i>
                                                    <el-dropdown-menu slot="dropdown">
                                                        <el-dropdown-item command="newFolder">新建文件夹</el-dropdown-item>
                                                    </el-dropdown-menu>
                                                </el-dropdown>
                                            </div>
                                        </div>
                                        <!--                                        <div class="item toschina-content__hidden">-->
                                        <!--                                            <a @click.prevent="newFolder" class="ui gradient button webide"-->
                                        <!--                                               target="_blank"-->
                                        <!--                                               href="#">新建文件夹-->
                                        <!--                                            </a>-->
                                        <!--                                        </div>-->
                                    </div>

                                </div>
                                <div class="breadcrumb_path path-breadcrumb-contrainer" id="git-project-breadcrumb">

                                </div>
                                <div class="ui horizontal list repo-action-list branches-tags" style="">
                                    <div class="item">
                                        <span class="ui blank button" th:text="|欢迎来到  ${owner.nickName}  的仓库|"><i
                                                class="iconfont icon-branches"></i>
                                            欢迎来到 xxx 的仓库
                                        </span></div>
                                </div>
                            </div>
                            <div class="row column tree-holder" id="tree-holder">
                                <div class="tree-content-holder" id="tree-content-holder">
                                    <div class="ui flat nopadding segment tree-content">
                                        <div class="git-project-recent-commit" id="git-project-info">

                                            <div v-if="filesMessages.length>0" class="recent-commit">
                                                <a class="commit-author-link  js-popover-card "
                                                   data-username="qw7790904"
                                                   href="#"><img
                                                        class="avatar circular ui image 20 mini" width="20"
                                                        alt="持续计划中...-qw7790904"
                                                        :src="filesMessages[0].file.user.head">
                                                    <span class="commit-author-name">{{filesMessages[0].file.user.nickName}}</span></a>
                                                <span>新建
                                                <a class="repo-index-commit-msg" :title="filesMessages[0].file.fname"
                                                   href="#" style="color: #0d95e8">{{filesMessages[0].file.fname}}</a>
                                                </span>
                                                <span>f8cd9c5</span>
                                                <span class="timeago" datetime="2022-08-03 08:40"
                                                      title="2022-08-03 08:40:45 +0000">{{filesMessages[0].beginTime}}</span>

                                            </div>

                                            <div class="all-commits">
                                                <a ><img class="avatar circular ui image 20 mini" width="20"
                                                         src="photo10086/文件.png">
                                                    {{filesSum}} 次上传
                                                </a></div>
                                        </div>
                                        <!-- ---------------------- 新建文件夹控件 v-if="showNewFolder" -->
                                        <div v-if="showNewFolder"
                                             class="grid list selection table_da39a3ee5e6b4b0d3255bfef95601890afd80709 tree-table ui">
                                            <div class="file_dfba7aade0868074c2861c98e2a9a92f3178a51b row tree-item"
                                                 data-branch="master" data-type="folder"
                                                 file_hex="file_dfba7aade0868074c2861c98e2a9a92f3178a51b">
                                                <div class="five wide column tree-item-file-name tree-folder tree-list-item"
                                                     data-path="config" data-type="folder" style="overflow: hidden;">
                                                    <i class="iconfont icon-folders"></i>
                                                    <el-input v-model="folderName" placeholder="新建文件夹"
                                                              @input="checkFolderName" autofocus="true"
                                                              title="文件名不能包含下列任何字符:\/:*?''<>|"></el-input>
                                                </div>
                                                <div style="display: inline-block;margin-left: 10px">
                                                    <div class="commit-details">
                                                        <el-button @click="newFolder" type="primary" plain>提交
                                                        </el-button>
                                                        <el-button @click="showNewFolder = false" plain>取消</el-button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--------------------------------------------------------上传的文件的展示，通过vue绑定展示---------------------------------------------------------------->
                                        <div v-for="f in fileListUploadOK"
                                             class="grid list selection table_da39a3ee5e6b4b0d3255bfef95601890afd80709 tree-table ui">
                                            <div class="file_dfba7aade0868074c2861c98e2a9a92f3178a51b row tree-item"
                                                 data-branch="master" data-type="folder"
                                                 file_hex="file_dfba7aade0868074c2861c98e2a9a92f3178a51b">
                                                <!--                                                文件名-->
                                                <div class="five wide column tree-item-file-name tree-folder tree-list-item"
                                                     data-path="config" data-type="folder" style="overflow: hidden;">
                                                    <i class="iconfont icon-folders"></i>
                                                    <!--------------------其它，这里可以再细分 视频，图片，txt，其它 TODO-->
                                                    <span :title="f.fname"><span
                                                            class="simplified-path"></span>{{f.fname}}
                                                    </span>

                                                    <!-----------------------此处做文件类型判断----------------------------------------------->
                                                </div>
                                                <!--                                                不是转发-->
                                                <div class="nine wide column tree_author"
                                                     style="display: inline-block;">
                                                    <div class="commit-details">
                                                        <a :title="f.user.nickName"
                                                           class="tree-commit-link"
                                                           href="#">{{f.user.nickName}}</a>
                                                    </div>
                                                </div>
                                                <!--                                                文件上传时间-->
                                                <div class="two wide column right aligned tree_time_ago"
                                                     style="display: inline-block;">
                                                <span class="timeago" datetime="2022-07-29 08:49"
                                                      :title="f.uploadTime">{{f.uploadTime.substring(11)}}</span>
                                                </div>
                                            </div>
                                        </div>

                                        <!------------------------------------------------------------文件的展示位置---------------------------------------------------->
                                        <div th:each="file : ${files}"
                                             class="grid list selection table_da39a3ee5e6b4b0d3255bfef95601890afd80709 tree-table ui">
                                            <div class="file_dfba7aade0868074c2861c98e2a9a92f3178a51b row tree-item"
                                                 data-branch="master" data-type="folder"
                                                 file_hex="file_dfba7aade0868074c2861c98e2a9a92f3178a51b">
                                                <!--                                                文件名-->
                                                <div class="five wide column tree-item-file-name tree-folder tree-list-item"
                                                     data-path="config" data-type="folder" style="overflow: hidden;">

                                                    <!---------------------------------------------------此处做文件类型判断----------------------------------------------->
                                                    <!--                                                    是文件夹-->
                                                    <!--                                                    根目录-->
                                                    <span th:if="${param.filePath==null}" th:with="cid=${param.cid}">

                                                        <img th:if="${!file.getFile().getFname().contains('.')}"
                                                                class="avatar circular ui image 20 mini" width="20"
                                                             src="photo10086/文件夹.png">
                                                        <a th:if="${!file.getFile().getFname().contains('.')}"
                                                           th:title="${file.getFile().getFname()}"
                                                           th:href="|detail?cid=${cid}&filePath=${file.getFile().getFname()}|"
                                                           th:text="${file.getFile().getFname()}"><span
                                                                class="simplified-path"></span>config
                                                        </a>
                                                    </span>
                                                    <!--                                                    非根目录-->
                                                    <span th:if="${param.filePath!=null}" th:with="cid=${param.cid}">
                                                        <img th:if="${!file.getFile().getFname().contains('.')}"
                                                             class="avatar circular ui image 20 mini" width="20"
                                                             src="photo10086/文件夹.png">
                                                        <a th:with="filePath=${param.filePath}"
                                                           th:if="${!file.getFile().getFname().contains('.')}"
                                                           th:title="${file.getFile().getFname()}"
                                                           th:href="|detail?cid=${cid}&filePath=${filePath}/${file.getFile().getFname()}|"
                                                           th:text="${file.getFile().getFname()}"><span
                                                                class="simplified-path"></span>config
                                                        </a>
                                                    </span>


                                                    <!--                                                    其它，这里可以再细分 视频，图片，txt，其它 TODO-->
                                                    <img th:if="${file.getFile().getFname().contains('.')}"
                                                         class="avatar circular ui image 20 mini" width="20"
                                                         src="photo10086/资源1.png">
                                                    <span th:if="${file.getFile().getFname().contains('.')}">
                                                        <a th:if="${file.getFile().getFname().endsWith('.mp4')}"
                                                           th:href="'play?fid='+${file.getFile().getFid()}"
                                                           th:title="${file.getFile().getFname()}"
                                                           th:text="${file.getFile().getFname()}" target="blank">
<!--                                                            <span class="simplified-path"></span>-->
                                                            config
                                                        </a>
                                                        <span th:if="${!file.getFile().getFname().endsWith('.mp4')}"
                                                              th:title="${file.getFile().getFname()}" >
                                                                <a th:href="${file.getFile().getPath()}" target="_blank"
                                                                   th:text="${file.getFile().getFname()}" class="simplified-path"></a>
                                                        </span>
                                                    </span>

                                                    <!--                                                    <span th:if="${file.getFile().getFname().contains('.')}">-->
                                                    <!--                                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-->
                                                    <!--                                                        <a th:href="${file.getFile().getPath()}" download>文件下载</a>-->
                                                    <!--                                                    </span>-->
                                                    <!-----------------------此处做文件类型判断----------------------------------------------->
                                                </div>
                                                <!--                                                文件资源下载链接-->
                                                <!--                                                是否为转发-->
                                                <!--                                                是转发-->
                                                <div th:if="${file.getIsSpread()!=0}"
                                                     class="nine wide column tree_author"
                                                     style="display: inline-block;">
                                                    <div class="commit-details">


                                                    <span th:if="${file.getFile().getFname().contains('.')}">
                                                        <a th:href="${file.getFile().getPath()}" download>文件下载</a>
                                                    </span>

                                                        <a th:title="${file.getFile().getUser().getNickName()}"
                                                           class="tree-commit-link"
                                                           href="#"
                                                           th:text="|转发来源:${file.getFile().getUser().getNickName()}|">转发来源：文件最初上传人</a>
                                                    </div>
                                                </div>
                                                <!--                                                不是转发-->
                                                <div th:if="${file.getIsSpread()==0}"
                                                     class="nine wide column tree_author"
                                                     style="display: inline-block;">
                                                    <div class="commit-details">


                                                    <span th:if="${file.getFile().getFname().contains('.')}">
                                                        <a th:href="${file.getFile().getPath()}" download>文件下载</a>
                                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                    </span>

                                                        <a th:title="|${file.getFile().getUser().getNickName()}|"
                                                           class="tree-commit-link"
                                                           href="#"
                                                           th:text="|${file.getFile().getUser().getNickName()}|">文件上传人</a>
                                                    </div>
                                                </div>
                                                <!--                                                文件上传时间-->
                                                <div class="two wide column right aligned tree_time_ago"
                                                     style="display: inline-block;">
                                                <span class="timeago" datetime="2022-07-29 08:49"
                                                      th:title="${file.getBeginTime()}"
                                                      th:text="${(file.getBeginTime())+''}">5天前</span>
                                                </div>
                                            </div>
                                        </div>
                                        <!------------------------------------------------------------文件的展示位置---------------------------------------------------->
                                        <!--                                       空白栏-->
                                        <div class="grid list selection table_da39a3ee5e6b4b0d3255bfef95601890afd80709 tree-table ui">
                                            <div class="file_dfba7aade0868074c2861c98e2a9a92f3178a51b row tree-item"
                                                 data-branch="master" data-type="folder"
                                                 file_hex="file_dfba7aade0868074c2861c98e2a9a92f3178a51b">
                                                <div class="nine wide column tree_author"
                                                     style="display: inline-block;">
                                                    <div class="commit-details">
                                                        <a title="update 我是谁啊." class="tree-commit-link"
                                                           href="#"></a>
                                                    </div>
                                                </div>
                                                <div class="two wide column right aligned tree_time_ago"
                                                     style="display: inline-block;">
                                                <span class="timeago" datetime="2022-07-29 08:49"
                                                      title="2022-07-29 08:49:11 +0000"></span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="project__footer-container">
                                    <div class="actions">
                                        <div class="item star-container">
                                            <div class="unstar">
                                                <a sa_evt="clickStar" sa_location="仓库页面" sa_url="" sa_repo_id="24113752"
                                                   data-remote="true" rel="nofollow" data-method="post"
                                                   href="https://gitee.com/qw7790904/yc116-config/unstar">
                                                    <div class="circle">
                                                        <i class="iconfont icon-star-solid"></i>
                                                    </div>
                                                </a><a class="content"
                                                       href="https://gitee.com/qw7790904/yc116-config/stargazers">
                                                <div class="title">
                                                    Starred
                                                </div>
                                                <div class="desc action-social-count">
                                                    0
                                                </div>
                                            </a></div>
                                            <div class="star">
                                                <a sa_evt="clickStar" sa_location="仓库页面" sa_url="" sa_repo_id="24113752"
                                                   data-remote="true" rel="nofollow" data-method="post"
                                                   href="https://gitee.com/qw7790904/yc116-config/star">
                                                    <div class="circle">
                                                        <i class="iconfont icon-star"></i>
                                                    </div>
                                                </a><a class="content"
                                                       href="https://gitee.com/qw7790904/yc116-config/stargazers">
                                                <div class="title">
                                                    Star
                                                </div>
                                                <div class="desc action-social-count">
                                                    0
                                                </div>
                                            </a></div>
                                        </div>
                                        <div class="item fork-container">
                                            <a id="fork-btm-button" sa_evt="repoFork" sa_repo_id="24113752"
                                               sa_is_self="true" sa_is_member="true" href="javascript: void(0);">
                                                <div class="circle">
                                                    <i class="iconfont icon-fork"></i>
                                                </div>
                                            </a><a href="https://gitee.com/qw7790904/yc116-config/members">
                                            <div class="content">
                                                <div class="title">
                                                    Fork
                                                </div>
                                                <div class="desc">
                                                    0
                                                </div>
                                            </div>
                                        </a></div>
                                        <div class="item donate-container">
                                            <div class="circle">
                                                <i class="iconfont icon-donate"></i>
                                            </div>
                                            <div class="content">
                                                <div class="title">捐赠</div>
                                                <div class="desc">
                                                    0 人次
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <!--===================================================================================================-->
                                <div class="row column inner-comment" id="blob-comment">
                                    <input type="hidden" name="comment_path" id="comment_path" value="">
                                    <div class="tree-comments">
                                        <h3 id="tree_comm_title">
                                            仓库评论
                                            (
                                            <span class="comments-count">
                                            0
                                            </span>
                                            )
                                        </h3>
                                        <div class="ui threaded comments middle aligned" id="notes-list"></div>
                                        <input type="hidden" name="ajax_add_note_id" id="ajax_add_note_id">
                                        <div class="text-center">
                                            <div class="tip-loading" style="display: none">
                                                <div class="ui active mini inline loader"></div>
                                                正在加载...
                                            </div>
                                        </div>
                                    </div>

                                </div>
                                <div class="inner-comment-box" id="comment-box">
                                    <div class="tree-comment-form" data-username="qw7790904" id="tree-comment-box">
                                        <img class="ui avatar image js-popover-card"
                                             src=""
                                             alt="持续计划中...-qw7790904">
                                        <div class="ui form">
                                            <input type="hidden" name="comment_url" id="comment_url"
                                                   value="/qw7790904/yc116-config/comment">
                                            <div class="field">
                                            <textarea maxLength="170" v-model="discuss" class="md-input"
                                                      id="editor_comment"
                                                      placeholder="在此输入你想说的话，如果是问题或者建议，请添加 issue。（评论支持 Markdown 格式）"></textarea>
                                            </div>
                                            <div class="ui checkbox js-check-star" style="display:block">
                                                <input name="comments_with_star" type="checkbox" tabindex="0"
                                                       class="hidden">
                                                <label>同时点个赞（Star）</label>
                                            </div>

                                            <div class="ui field aligned except-editor-textarea mt-2">
                                                <div class="ui warning message" id="comment_error_message"
                                                     style="display: block;">
                                                    评论内容请保持在200字以内，项目相关的技术问题、缺陷报告、建议等信息请通过<a
                                                        href="https://gitee.com/qw7790904/yc116-config/issues/new">
                                                    Issue </a>发布
                                                </div>
                                                <div class="ui orange button js-comment-button disabled"
                                                     id="only_comment">
                                                    评论
                                                </div>
                                                <button @click.prevent="talk">评论</button>
                                                <span class="text-muted" id="comment_characters_message">0</span>
                                                <span class="text-muted">/</span>
                                                <span class="text-muted">200</span>
                                                <div class="ui blank button js-close-discussion-note-form"
                                                     id="comment_cancel_btn" style="display: none;">
                                                    取消
                                                </div>
                                                <div>
                                                    <span>排序</span>
                                                    <el-divider direction="vertical"></el-divider>
                                                    <span><a @click.prevent="prequeryComment(1)">最新评论</a></span>
                                                    <el-divider direction="vertical"></el-divider>
                                                    <span><a @click.prevent="prequeryComment(0)">热门评论</a></span>
                                                </div>
                                                <div>
                                                    <div>
                                                        <div v-for="(c,i) in comment"
                                                             style="height: 100px ;position: relative">
                                                            <el-divider content-position="left"><img
                                                                    style="border-radius: 50px;" height="40px"
                                                                    width="40px" :src="c.user.head">{{c.user.nickName}}
                                                                <span style="float:right">{{c.talkTime}}</span>
                                                            </el-divider>

                                                            <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{c.body}}</span>
                                                            <br>
                                                            <div>
                                                                <button @click.prevent="drawer = true;queryCommentSon(c.pid)"
                                                                        type="primary"
                                                                        style=" position: absolute;color:black; border: orange;border-radius: 10px;left: 660px; top: 90px;background-color: orange">
                                                                    查看回复{{reply[i]}}
                                                                </button>
                                                                <el-drawer
                                                                        :size="size"
                                                                        :visible.sync="drawer"
                                                                        :with-header="false">
                                                                    <ul class="infinite-list" v-infinite-scroll="load"
                                                                        style="overflow:auto">
                                                                        <div style="height: 150px">
                                                                            <el-divider content-position="left"><img
                                                                                    style="border-radius: 50px;"
                                                                                    height="40px" width="40px"
                                                                                    :src="comment[parentindex].user.head">{{comment[parentindex].user.nickName}}
                                                                                <span style="float:right">{{comment[parentindex].talkTime}}</span>
                                                                                <span style="left: 200px">(楼主)</span>
                                                                            </el-divider>
                                                                            <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{comment[parentindex].body}}</span>

                                                                            <button @click.prevent="dianzan(comment[parentindex].pid)"
                                                                                    style="position: absolute;border: orange;border-radius: 10px;left: 690px; top: 140px;background-color: orange">
                                                                                点赞({{comment[parentindex].likenum}})
                                                                            </button>

                                                                            <el-popover
                                                                                    placement="right"
                                                                                    width="400"
                                                                                    trigger="click">
                                                                                <textarea maxLength="170"
                                                                                          v-model="commentdiscuss"
                                                                                          class="md-input"
                                                                                          style="height: 200px;width: 300px;resize:none"
                                                                                          placeholder="在此输入你想说的话，如果是问题或者建议，请添加 issue。（评论支持 Markdown 格式）"></textarea>
                                                                                <button @click.prevent="talkto(-1,comment[parentindex].pid)"
                                                                                        style="border: orange;border-radius: 10px; background-color: orange ; ">
                                                                                    发送
                                                                                </button>
                                                                                <button @click.prevent="changetouser(comment[parentindex].pid)"
                                                                                        slot="reference"
                                                                                        style="position: absolute;border: orange;border-radius: 10px;left: 640px; top: 140px;background-color: orange">
                                                                                    回复
                                                                                </button>
                                                                            </el-popover>
                                                                            <br>
                                                                        </div>
                                                                        <div v-for="(cs,j) in commentson"
                                                                             style="height: 100px ;position: relative">
                                                                            <el-divider content-position="left">
                                                                                <img style="border-radius: 50px;"
                                                                                     height="40px" width="40px"
                                                                                     :src="cs.user.head">{{cs.user.nickName}}
                                                                                <span style="float:right">{{cs.talkTime}}</span>
                                                                                <span v-if="c.uid==cs.user.uid"
                                                                                      style="left: 200px">(楼主)</span>
                                                                            </el-divider>
                                                                            <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{cs.body}}</span>
                                                                            <br>
                                                                            <button @click.prevent="dianzan(cs.pid,comment[parentindex].pid)"
                                                                                    style="position: absolute;border: orange;border-radius: 10px;left: 650px; top: 90px;background-color: orange">
                                                                                点赞({{cs.likenum}})
                                                                            </button>
                                                                            <el-popover
                                                                                    placement="right"
                                                                                    width="400"
                                                                                    trigger="click">
                                                                                <textarea maxLength="170"
                                                                                          v-model="commentdiscuss"
                                                                                          class="md-input"
                                                                                          style="height: 200px;width: 300px;resize:none"
                                                                                          placeholder="在此输入你想说的话，如果是问题或者建议，请添加 issue。（评论支持 Markdown 格式）"></textarea>
                                                                                <button @click.prevent="talkto(cs.pid,comment[parentindex].pid)"
                                                                                        style="border: orange;border-radius: 10px; background-color: orange ; ">
                                                                                    发送
                                                                                </button>
                                                                                <button @click.prevent="changetouser(cs.pid)"
                                                                                        slot="reference"
                                                                                        style="position: absolute;border: orange;border-radius: 10px;left: 600px; top: 90px;background-color: orange">
                                                                                    回复
                                                                                </button>

                                                                            </el-popover>
                                                                        </div>
                                                                    </ul>
                                                                </el-drawer>
                                                                <button @click.prevent="dianzan(c.pid)"
                                                                        style="position: absolute;border: orange;border-radius: 10px;left: 740px; top: 90px;background-color: orange">
                                                                    点赞({{c.likenum}})
                                                                </button>
                                                            </div>
                                                        </div>
                                                        <el-pagination
                                                                background
                                                                layout="prev, pager, next"
                                                                @current-change="queryComment"
                                                                :current-page.sync="currentPage"
                                                                :page-size="Pagesize"
                                                                :total="total">
                                                        </el-pagination>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                </div>

                                <div class="complaint">
                                    <div class="ui modal small form" id="landing-comments-complaint-modal">
                                        <i class="iconfont icon-close close"></i>
                                        <div class="header">
                                            举报
                                        </div>
                                        <div class="content">
                                            <div class="appeal-success-tip hide">
                                                <i class="iconfont icon-ic_msg_success"></i>
                                                <div class="appeal-success-text">
                                                    举报成功
                                                </div>
                                                <span>
我们将于2个工作日内通过站内信反馈结果给你！
</span>
                                            </div>
                                            <div class="appeal-tip">
                                                请认真填写举报原因，尽可能描述详细。
                                            </div>
                                            <div class="ui form appeal-form">
                                                <div class="inline field">
                                                    <label class="left-part appeal-type-wrap">
                                                        举报类型
                                                    </label>
                                                    <div class="ui dropdown selection" id="appeal-comments-types"
                                                         tabindex="0">
                                                        <div class="text default">
                                                            请选择举报类型
                                                        </div>
                                                        <i class="dropdown icon"></i>
                                                        <div class="menu" tabindex="-1"></div>
                                                    </div>
                                                </div>
                                                <div class="inline field">
                                                    <label class="left-part">
                                                        举报原因
                                                    </label>
                                                    <textarea class="appeal-reason" id="appeal-comment-reason"
                                                              name="msg"
                                                              placeholder="请说明举报原因" rows="3"></textarea>
                                                </div>
                                                <div class="ui message callback-msg hide"></div>
                                                <div class="ui small error text message exceeded-size-tip"></div>
                                            </div>
                                        </div>
                                    </div>


                                </div>
                            </div>
                        </div>
                    </div>
                    <!--                简介 发行 贡献者  近期动态-->
                    <div class="four wide column" style="">
                        <div class="project__right-side">
                            <div class="side-item intro">
                                <div class="header">
                                    <h4>简介</h4>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <img class="avatar circular ui image 20 mini" width="20"
                                         src="photo10086/简介.png">

                                </div>
                                <div class="content">
                                    <span class="git-project-desc-text" th:text="${store.introduce}">配置库配置库配置库配置库</span>
                                </div>
                            </div>
                            <div class="side-item contrib"
                                 data-url="/qw7790904/yc116-config/contributors_count?ref=master"
                                 id="contributor">
                                <div class="header">
                                    <h4>
                                        贡献者
                                        <span class="text-muted"
                                              id="contributor-count">({{gUserMessages.length}})</span>
                                    </h4>
                                </div>
                                <div class="content" id="contributor-list">
                                    <!--                                    TODO:跳转到个人信息页面-->
                                    <a v-for="user in gUserMessages" href="myinfo.htm" class="js-popover-card" data-username="">
                                        <img class="ui avatar image" alt="bossYang"
                                             :src="user.head">
                                    </a>
                                </div>
                                <div class="ui centered inline loader" id="contributor-loader"></div>
                            </div>
                            <div class="side-item events" data-url="/qw7790904/yc116-config/events.json"
                                 id="proj-events">
                                <div class="header">
                                    <h4>近期动态</h4>
                                </div>
                                <div class="content">
                                    <div class="ui comments" id="event-list">
                                        <div v-for="f in filesMessages" class="comment">
                                            <div class="avatar"><a href="https://gitee.com/qw7790904"
                                                                   class="js-popover-card" data-username="qw7790904">
                                                <img class="ui avatar image" alt="持续计划中..."
                                                     :src="f.file.user.head">
                                            </a></div>
                                            <div class="content">上传/新建 <a style="color: #0d95e8" href="#">{{f.file.fname}}</a>
                                                <div>{{f.beginTime.replaceAll('T',' ')}}</div>
                                            </div>
                                        </div>
                                    </div>
                                    <a v-if="filesMessages.length<filesSum" class="loadmore hide"
                                       @click="selectFilesByCidPage" style="display: inline;">加载更多
                                        <i class="icon dropdown"></i>
                                    </a>
                                </div>
                            </div>
                        </div>


                    </div>
                </div>
            </div>
        </div>
    </div>

    <el-drawer
            title="文件上传"
            :visible.sync="drawer0"
            :before-close="handleClose">
        <el-upload
                class="upload-demo"
                action="sp-store/cloudvideo/file/uploadO"
                :data="savePath"
                :on-preview="handlePreview"
                :on-remove="handleRemove"
                :before-remove="beforeRemove"
                :on-success="handleAvatarSuccess"
                :on-error="handleAvatarFalse"
                multiple
                :limit="3"
                :on-exceed="handleExceed"
                :file-list="fileList">
            <el-button style="margin-left: 20px" size="small" type="primary">点击上传</el-button>
        </el-upload>
    </el-drawer>
</div>
</body>
<script th:inline="javascript">
    var v = new Vue({
        el: "#app",
        data: {
            drawer0: false,
            showNewFolder: false,//新建文件夹控件，默认false 不显示
            folderName: "",//新建文件夹的名字
            gUserMessages: "",//存储仓库贡献者信息
            filesSum: 0,//仓库总资源数量
            filesMessages: "",//存储当前页面渲染的仓库资源信息
            fileList: "",//用户要上传的文件
            savePath: {uid:"",savePath: "", cid: ""},//保存的路径
            fileListUploadOK: new Array(),//用户已经上传了的文件
            //====================================================================
            discuss: "",
            comment: [],
            drawer: false,
            size: '800px',
            total: 0,
            Pagesize: 7,
            order: 1,
            currentPage: 1,
            reply: [],
            commentson: [],
            commentdiscuss: "",
            brotherid: "",
            parentindex: 0,
            user:''
        },
        created() {
            //====================================================================
            this.queryComment()//queryComment
            this.getUser()

            //贡献者渲染
            this.getUsersGByCid();
            this.selectFilesSumByCid();
            this.selectFilesByCidPage();
            let savePath = new Array();
              savePath  =  [[${paths}]]

            this.savePath.cid = [[${store.cid}]]
            if(savePath.length>0)
                this.savePath.savePath = [[${store.path}]] + "/" + savePath[savePath.length - 1].path
            else{
                this.savePath.savePath = [[${store.path}]]
            }
        },
        methods: {
            getUser(){
                axios.get("sp-user/cloudvideo/user/getLoginedUser").then(res=>{
                    this.user=res.data.data;
                    console.info(this.user)
                    this.savePath.uid = this.user.uid;
                })
            },
            downLoad() {
                console.log("000000000000000")
                axios.get("download/upload\\store\\1\\测试仓库\\一级目录文件\\啊啊啊啊啊啊\\1.png").then(res => {
                    console.log("init -----------------------")
                })
            },
            handleAvatarFalse(res) {
                let erm = JSON.parse(res.message)
                this.$alert(erm.message)
            },
            handleAvatarSuccess(res, file) {
                console.log("上传文件成功")
                //查询出文件信息，添加到fileListUploadOK中，渲染到页面
                console.log(res.data)
                let param = new URLSearchParams();
                param.append("path", res.data)
                axios.post("sp-store/cloudvideo/file/selectFileByPath", param).then(res => {
                    this.fileListUploadOK.unshift(res.data)//在头部添加
                })
            },
            handleRemove(file, fileList) {

                console.log(file, fileList);
            },
            handlePreview(file) {
                console.log(file);
            },
            handleExceed(files, fileList) {
                this.$message.warning(`当前限制选择 3 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`);
            },
            beforeRemove(file, fileList) {
                return this.$confirm(`确定移除 ${file.name}？`);
            },
            handleClose(done) {
                done();
                // this.$confirm('确认关闭？')
                //     .then(_ => {
                //         done();
                //     })
                //     .catch(_ => {
                //     });
            },
            //获取五条记录
            selectFilesByCidPage() {
                //获取仓库id
                var cid = [[${store.cid}]]
                let params = new URLSearchParams();
                params.append("cid", cid);
                params.append("begin", this.filesMessages.length)//传入limit的参数：起始位置
                axios.post("sp-store/cloudvideo/file/selectFilesByCidPage", params).then(res => {
                    if (this.filesMessages.length == 0) {
                        this.filesMessages = res.data;
                    } else {
                        res.data.forEach(d => {
                            this.filesMessages.push(d)
                        })
                    }
                })
            },
            //获取仓库总资源数
            selectFilesSumByCid() {
                //获取仓库id
                var cid = [[${store.cid}]]
                let params = new URLSearchParams();
                params.append("cid", cid);
                axios.post("sp-store/cloudvideo/file/selectFilesSumByCid", params).then(res => {
                    this.filesSum = res.data;
                })

            },
            //获取仓库贡献者信息
            getUsersGByCid() {
                //获取仓库id
                var cid = [[${store.cid}]]
                let params = new URLSearchParams();
                params.append("cid", cid);
                axios.post("sp-user/cloudvideo/user/getUsersGByCid", params).then(res => {
                    this.gUserMessages = res.data;
                })
            },
            //提交 new 文件夹按钮
            newFolder() {
                //需要获取到当前路径
                var paths = [[${paths}]]
                //获取仓库id
                var cid = [[${store.cid}]]
                var p = "";
                if (paths.length > 0) {
                    p = p + paths[paths.length - 1].path
                }
                let params = new URLSearchParams();
                params.append("cid", cid);
                params.append("path", p);
                params.append("folderName", this.folderName);
                params.append("uid",this.user.uid)
                axios.post("sp-store/cloudvideo/file/newFolder", params).then(res => {

                    this.$alert(res.data.msg, {
                        callback: action => {
                            //状态码 成功
                            if (res.data.code == 1) {
                                this.showNewFolder = false
                                location.reload();
                            }
                        }
                    });

                })
            },
            //文件夹命名规范
            checkFolderName() {
                //  新建文件夹不能包含特殊字符  \/:*?''<>|
                if (this.folderName.charAt(this.folderName.length - 1).search(/[\\\/:*?"<>|]/gm) != -1) {
                    this.folderName = this.folderName.substring(0, this.folderName.length - 1)
                    this.$notify.error({
                        title: '错误',
                        message: '文件名不能包含下列任何字符:\\/:*?"<>|'
                    });
                }
            },
            fileButtons(command) {
                if (command == "newFolder") {//新建文件夹
                    this.showNewFolder = true
                }
            },

            //====================================================================
            fileButtons(command) {
                if (command == "newFolder") {//新建文件夹
                    this.showNewFolder = true
                }
            },
            changetouser(brotherid) {
                if (this.brotherid != brotherid) {
                    this.commentdiscuss = null;
                    this.brotherid = brotherid;
                }
            },
            mytime(obj) {
                return obj.date.year + "-" + obj.date.month + "-" + obj.date.day + " " +
                    obj.time.hour + ":" + obj.time.minute + ":" + obj.time.second;
            },
            load() {
                this.count += this.Pagesize
            },
            dianzan(pid, parentid) {
                let params = new URLSearchParams();
                params.append("pid", pid);
                params.append("uid",this.user.uid)
                axios.post("/sp-store/cloudvideo/commentUser/dianzan", params).then(res => {
                    this.queryComment();
                    if (parentid) {
                        this.queryCommentSon(parentid);
                    }
                })
            },
            queryCommentSon(parentid) {
                for (let i = 0; i < this.comment.length; i++) {
                    if (this.comment[i].pid == parentid) {
                        this.parentindex = i
                    }
                }
                let params = new URLSearchParams();
                params.append("parentid", parentid);
                axios.post("/sp-store/cloudvideo/comment/queryCommentSon", params).then(res => {
                    this.commentson = res.data;
                    for (let i = 0; i < this.commentson.length; i++) {
                        this.commentson[i].talkTime = this.mytime(this.commentson[i].talkTime)
                    }
                })
            },
            talk() {
                let params = new URLSearchParams();
                let body = (this.discuss);
                let cid = [[${param.cid}]]
                params.append("uid",v.user.uid)
                params.append("body", body);
                params.append("cid", cid);

                console.log("llllllllllllllll",cid)
                axios.post("/sp-store/cloudvideo/comment/talk", params).then(res => {
                    if (res.data.code == 1) {
                        this.message("发表评论", res.data.msg)
                        this.discuss = null;
                        this.queryComment();
                    } else if (res.data.code == 0) {
                        this.message("发表评论", res.data.msg)
                    }
                })
            },
            talkto(brotherid, parentid) {
                let params = new URLSearchParams();
                let cid = [[${param.cid}]]
                params.append("uid",v.user.uid)
                params.append("cid", cid);
                console.log("llllllllllllllll",cid)
                params.append("body", this.commentdiscuss);
                params.append("parentid", parentid);
                if (brotherid) {
                    params.append("brotherid", brotherid);
                }
                axios.post("/sp-store/cloudvideo/comment/talkto", params).then(res => {
                    if (res.data.code == 1) {
                        this.message("论发表评", res.data.msg)
                        this.commentdiscuss = null;
                        this.queryCommentSon(parentid);
                    } else if (res.data.code == 0) {
                        this.message("发表评论", res.data.msg)
                    }
                })
            },
            prequeryComment(order) {
                this.order = order;
                this.currentPage = 1;
                this.queryComment(this.currentPage);
            },
            queryComment() {
                let params = new URLSearchParams();
                let cid = [[${param.cid}]]
                cid = [[${param.cid}]]
                params.append("cid", cid);
                params.append("size", this.Pagesize);
                params.append("page", this.currentPage)
                if (this.order == 1) {
                    axios.post("/sp-store/cloudvideo/comment/queryCommentByDesc", params).then(res => {
                        this.comment = res.data.comments;
                        this.total = res.data.total;
                        this.reply = res.data.reply;
                        for (let i = 0; i < this.comment.length; i++) {
                            this.comment[i].talkTime = this.mytime(this.comment[i].talkTime)
                        }
                    })
                } else {
                    axios.post("/sp-store/cloudvideo/comment/queryCommentByLikenum", params).then(res => {
                        this.comment = res.data.comments;
                        this.total = res.data.total;
                        for (let i = 0; i < this.comment.length; i++) {
                            this.comment[i].talkTime = this.mytime(this.comment[i].talkTime)
                        }
                    })
                }
            },
            message(title, message) {
                this.$notify({
                    title: title,
                    message: message,
                    offset: 300
                });
            },
        }
    })
</script>
</html>